package com.easou.ps.rpc.temp;

import com.easou.ps.common.servicehandle.ServiceAddress;

public class ServerAddress {
	private String ip;
	private int port;
	private String shardLabel;
	private int id;
	
	public ServerAddress(String ip, int port, String shardLabel, int id) {
		this.ip = ip;
		this.port = port;
		this.shardLabel = shardLabel;
		this.id = id;
	}

	public String getIp() {
		return ip;
	}

	public int getPort() {
		return port;
	}
	
	public String getShardLabel() {
		return shardLabel;
	}

	public int getId() {
		return id;
	}
	
	public ServiceAddress toServiceAddress() {
		return new ServiceAddress(ip, port);
	}
	
	public String toString() {
		return ip + ":" + port;
	}

}
